package com.example.statistics.bean;

import com.jhj.slimadapter.model.BaseTreeModel;

import org.jetbrains.annotations.Nullable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class GoodsTreeBean extends BaseTreeModel<GoodsTreeBean> implements Serializable {

    private int id;
    private int parentId;
    private String parentName;
    private String path;
    private String name;
    private List<String> imageList;
    private String description;
    private boolean root;
    private List<GoodsTreeBean> children;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getName() {
        return name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<String> getImageList() {
        return imageList;
    }

    public void setImageList(List<String> imageList) {
        this.imageList = imageList;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setChildren(List<GoodsTreeBean> children) {
        this.children = children;
    }

    @Override
    public boolean isRoot() {
        return root;
    }

    @Override
    public void setRoot(boolean b) {
        this.root = b;
    }

    @Nullable
    @Override
    public ArrayList<GoodsTreeBean> getChildren() {
        if (children == null)
            return new ArrayList<GoodsTreeBean>();
        return (ArrayList<GoodsTreeBean>) children;
    }
}
